import time

import allure
from page_base.page_base import Base
from page_element.el_roo import *
from utils.timer import sleep
import logging

class PageSettlement(Base):
    """登录页面"""
    def page_settlement(self):
        # 打开A3mall
        self.open_url(url)
        self.maximize_window()

        with allure.step(f"选择板块"):
            self.click(roo_login_page.settlement_btn)
            time.sleep(4)

        # with allure.step(f"选择结算子分支"):
        #     self.click(roo_login_page.open_settlement)

        with allure.step("输入搜索内容"):
            self.send_keys(roo_login_page.search_input,"mobile")

        with allure.step("点击搜索"):
            self.click(roo_login_page.search_btn)

        # 断言
        with allure.step("验证搜索"):
                dy = self.text(roo_login_page.dy_search)
                assert "mobile" == dy
                logging.info(f"验证成功")
